home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DTP / DTP_TEX / 2848F.ZIP / INPUTS2.ARC / SLITEX.TEX < prev    next >
Text File  |  1987-12-15  |  25KB  |  703 lines

  1. % SLITEX VERSION 2.09 - RELEASE OF 10 November 86
  2. % Copyright (C) 1986 by Leslie Lamport
  3.  
  4. \everyjob{\typeout{SliTeX Version 2.09 - Release 10 November 86}}
  5. \immediate\write10{SliTeX Version 2.09 - Release 10 November 86}
  6.  
  7. % NOTES FOR DEFINING FONTS AND STYLES FOR SLIDES
  8. %   Every font definition -- \rm, \it, etc. must \def\@currfont to itself.
  9. %   Every size definition such as \normalsize is defined to be
  10. %          \@normalsize
  11. %          \def\@currsize{\@normal}\rm 
  12. %          commands to set:
  13. %             \baselineskip 
  14. %             \lineskip
  15. %             the ...displayskip and ...displayshortskip parameters
  16. %             \strutbox
  17. %             \parskip and \@parskip
  18. %   where \@normal makes all the font definitions.
  19. %   \@normal must test the switch @visible and define its 
  20. %   fonts equal to the visible or the invisible versions accordingly.
  21.  
  22.  \message{hacks,}
  23. %      **********************************************
  24. %      *          HACKS FOR SLIDE MACROS            *
  25. %      **********************************************
  26. % The macro \@getend{FOO} defines \@arg to equal all the text up to
  27. % but excluding the next \end{FOO}, which it gobbles up.  
  28. % Note that the characters in this text will all be interpreted with
  29. % their current category codes, so any embedded environments (such as
  30. % an example environment) won't work right.  NOTE--GOBBLES
  31. % THE \fi's -- MUST BE MODIFIED LIKE \@gobbletoend BELOW.
  32.  
  33.  
  34. %\def\@getend#1{\def\@arg{}\def\@argend{#1}\@addtoarg}
  35. %
  36. %\long\def\@addtoarg#1\end#2{\tokens{#1}%
  37. %\long\edef\@x@add##1\@@{\long\def\@arg{##1\the\tokens}}%
  38. %\expandafter\@x@add\@arg\@@\def\@x@a{#2}\ifx\@x@a\@argend\else
  39. %\tokens{\end{#2}}\long\edef\@x@add##1\@@{\long\def\@arg{##1\the\tokens}}%
  40. %\expandafter\@x@add\@arg\@@\@addtoarg\fi}
  41.  
  42. % \@gobbletoend{FOO} gobbles all text up to and including the
  43. % next \end{FOO}.  Must be used inside an \if, right before the \fi.
  44.  
  45. \def\@gobbletoend#1{\def\@argend{#1}\@ggobtoend}
  46.  
  47. \long\def\@ggobtoend#1\end#2{\@xfi\def\@x@a{#2}%
  48. \ifx\@x@a\@argend\else\@ggobtoend\fi}
  49. \def\@xfi{\fi}
  50.  
  51.  \message{slides,}
  52. %      **********************************************
  53. %      *               SLIDE  MACROS                *
  54. %      **********************************************
  55. % Switches:
  56. % @bw      : true if making black and white slides
  57. % @visible : true if visible output to be produced.
  58. % @makingslides : true if executing \blackandwhite or \colorslides
  59.  
  60. \newif\if@bw
  61. \newif\if@visible
  62. \newif\if@onlyslidesw \@onlyslideswfalse
  63. \newif\if@onlynotesw  \@onlynoteswfalse
  64. \newif\if@makingslides
  65.  
  66. % Counters
  67. %  slide   = slide number
  68. %  overlay = overlay number for a slide
  69. %  note    = note number for a slide
  70.  
  71. \countdef\c@slide=0 \c@slide=0
  72. \def\cl@slide{}
  73. \countdef\c@overlay=1 \c@overlay=0
  74. \def\cl@overlay{}
  75. \countdef\c@note=2 \c@note=0
  76. \def\cl@note{}
  77.  
  78.  
  79. \@addtoreset{overlay}{slide}
  80. \@addtoreset{note}{slide}
  81.  
  82. % Redefine page counter to some other number.
  83. % The page counter will always be zero except when putting out an
  84. % extra page for a slide, note or overlay.
  85. %
  86. \@definecounter{page} 
  87. \@addtoreset{page}{slide}
  88. \@addtoreset{page}{note}
  89. \@addtoreset{page}{overlay}
  90.  
  91.  
  92. \def\theslide{\@arabic\c@slide}
  93. \def\theoverlay{\theslide-\@alph\c@overlay}
  94. \def\thenote{\theslide-\@arabic\c@note}
  95.  
  96. % \@setlimits \LIST \LOW \HIGH 
  97. %
  98. %    Assumes that \LIST = RANGE1,RANGE2,...,RANGEn  (n>0)
  99. %    Where RANGEi = j or j-k.
  100. %    
  101. %    Then \@setlimits  globally sets
  102. %        (i) \LIST := RANGE2, ... , RANGEn
  103. %       (ii) \LOW  := p
  104. %      (iii) \HIGH := q
  105. %   where either RANGE1 = p-q   or  RANGE1 = p  and  q=p.
  106.  
  107. \def\@sl@getargs#1-#2-#3\relax#4#5{\xdef#4{#1}\xdef#5{#2}}
  108. \def\@sl@ccdr#1,#2\relax#3#4{\xdef#3{#1-#1-}\xdef#4{#2}}
  109.  
  110. \def\@setlimits #1#2#3{\expandafter\@sl@ccdr#1\relax\@sl@gtmp #1%
  111. \expandafter\@sl@getargs\@sl@gtmp\relax#2#3}
  112.  
  113. % \onlyslides{LIST} ::=
  114. %  BEGIN
  115. %    @onlyslidesw := true
  116. %    \@doglslidelist :=G LIST,999999,999999
  117. %   if @onlynotesw = true
  118. %     else @onlynotesw := true
  119. %          \@doglnotelist :=G LIST,999999,999999
  120. %   fi
  121. %   message: Only Slides LIST
  122. %  END
  123.  
  124. \def\onlyslides#1{\@onlyslideswtrue\gdef\@doglslidelist{#1,999999,999999}%
  125. \if@onlynotesw \else \@onlynoteswtrue\gdef\@doglnotelist{999999,999999}\fi
  126. \typeout{Only Slides #1}}
  127.  
  128. % \onlynotes{LIST} ::=
  129. %  BEGIN
  130. %    @onlynotesw := true
  131. %    \@doglnotelist :=G LIST,999999,999999
  132. %   if @onlyslidesw = true
  133. %     else \@onlyslidesw := true
  134. %          \@doglslidelist{999999,999999}
  135. %   fi
  136. %   message: Only Notes LIST
  137. %  END
  138.  
  139. \def\onlynotes#1{\@onlynoteswtrue\gdef\@doglnotelist{#1,999999,999999}%
  140. \if@onlyslidesw \else \@onlyslideswtrue\gdef\@doglslidelist{999999,999999}\fi
  141. \typeout{Only Notes #1}}
  142.  
  143.  
  144. % \blackandwhite #1  ::=
  145. %    \newpage
  146. %    page counter := 0
  147. %    @bw := T
  148. %    @visible := T
  149. %    if @onlyslidesw = true
  150. %      then  \@doslidelist := \@doglslidelist
  151. %            \@setlimits\@doslidelist\@doslidelow\@doslidehigh
  152. %    fi
  153. %    if @onlynotesw = true
  154. %      then  \@donotelist := \@doglnotelist
  155. %            \@setlimits\@donotelist\@donotelow\@donotehigh
  156. %    fi
  157. %    \normalsize    % Note, this sets font to \rm , which sets
  158. %                     % \@currfont to \rm
  159. %    counter slidenumber := 0
  160. %    counter note        := 0
  161. %    counter overlay     := 0
  162. %    @makingslides       := T
  163. %    input #1
  164. %    @makingslides       := F
  165.  
  166. \def\blackandwhite#1{\newpage\setcounter{page}{0}\@bwtrue\@visibletrue
  167. \if@onlyslidesw \xdef\@doslidelist{\@doglslidelist}%
  168. \@setlimits\@doslidelist\@doslidelow\@doslidehigh\fi
  169. \if@onlynotesw \xdef\@donotelist{\@doglnotelist}%
  170. \@setlimits\@donotelist\@donotelow\@donotehigh\fi
  171. \normalsize\setcounter{slide}{0}\setcounter{overlay}{0}%
  172. \setcounter{note}{0}\@makingslidestrue\input #1\@makingslidesfalse}
  173.  
  174.  
  175. % \colors{COLORS} ::=
  176. %  for \@colortemp := COLORS
  177. %     do \csname \@colortemp \endcsname == \@color{\@colortemp} od
  178. %  if \@colorlist = empty
  179. %     then \@colorlist := COLORS
  180. %     else \@colorlist := \@colorlist , COLORS
  181. %  fi
  182. %
  183. \def\colors#1{\@for\@colortemp:=#1\do{\expandafter
  184.   \xdef\csname\@colortemp\endcsname{\noexpand\@color{\@colortemp}}}\ifx
  185.   \@colorlist\@empty \gdef\@colorlist{#1}
  186.     \else \xdef\@colorlist{\@colorlist,#1}\fi}
  187.  
  188. \def\@colorlist{}
  189.  
  190. % \colorslides{FILE} ::=
  191. %    \newpage
  192. %    page counter := 0
  193. %    @bw := F
  194. %    for \@currcolor := \@colorlist
  195. %      do  @visible := T
  196. %          if @onlyslidesw = true
  197. %            then  \@doslidelist := \@doglslidelist
  198. %                  \@setlimits\@doslidelist\@doslidelow\@doslidehigh
  199. %          fi
  200. %          if @onlynotesw = true
  201. %            then  \@donotelist := \@doglnotelist
  202. %                  \@setlimits\@donotelist\@donotelow\@donotehigh
  203. %          fi
  204. %          \normalsize
  205. %          counter slide := 0
  206. %          counter overlay := 0
  207. %          counter note    := 0
  208. %          type message
  209. %          generate color layer output page
  210. %          @makingslides := T
  211. %          input #1
  212. %          @makingslides := F
  213. %      od
  214.  
  215. \def\colorslides#1{\newpage\setcounter{page}{0}\@bwfalse
  216. \@for\@currcolor:=\@colorlist\do
  217. {\@visibletrue
  218. \if@onlyslidesw \xdef\@doslidelist{\@doglslidelist}%
  219. \@setlimits\@doslidelist\@doslidelow\@doslidehigh\fi
  220. \if@onlynotesw \xdef\@donotelist{\@doglnotelist}%
  221. \@setlimits\@donotelist\@donotelow\@donotehigh\fi
  222. \normalsize\setcounter{slide}{0}\setcounter{overlay}{0}%
  223. \setcounter{note}{0}\typeout{color \@currcolor}%
  224. \newpage
  225. \begin{huge}
  226. \begin{center}
  227. COLOR LAYER\\[.75in]
  228. \@currcolor
  229. \end{center}
  230. \end{huge}
  231. \newpage
  232. \@makingslidestrue
  233. \input #1
  234. \@makingslidesfalse}}
  235.  
  236.  
  237. % \slide COLORS ::=
  238. %  BEGIN
  239. %   \stepcounter{slide}   
  240. %   \@slidesw :=G T
  241. %   if @onlyslidesw = true                     % set \@slidesw = T iff page to
  242. %     then                                   % be output
  243. %       while \c@slide > \@doslidehigh
  244. %          do  \@setlimits\@doslidelist\@doslidelow\@doslidehigh  od
  245. %       if \c@slide < \@doslidelow
  246. %         then \@slidesw := F
  247. %       fi
  248. %   fi
  249. %   if \@slidesw = T
  250. %      then \@slidesw :=G F
  251. %           \begingroup                           
  252. %              if @bw = true  
  253. %                then  \@slidesw :=G T   
  254. %                else \@color{COLORS}
  255. %                     \if@visible then \@slidesw :=G T \fi
  256. %              fi
  257. %            \endgroup
  258. %  fi
  259. %  if \@slidesw = T
  260. %    then \newpage
  261. %         \thispagestyle{slide}
  262. %    else \end{slide}
  263. %          \@gobbletoend{slide}
  264. %  fi
  265. % END
  266.  
  267. % \endslide ::=
  268. %  BEGIN
  269. %    \par\break
  270. %  END
  271.  
  272. \def\slide#1{\stepcounter{slide}\gdef\@slidesw{T}\if@onlyslidesw
  273. \@whilenum \c@slide > \@doslidehigh\relax
  274. \do{\@setlimits\@doslidelist\@doslidelow\@doslidehigh}\ifnum
  275. \c@slide < \@doslidelow\relax\gdef\@slidesw{F}\fi\fi
  276. \if\@slidesw T\gdef\@slidesw{F}\begingroup\if@bw\gdef\@slidesw{T}\else
  277. \@color{#1}\if@visible \gdef\@slidesw{T}\fi\fi\endgroup\fi
  278. \if\@slidesw T\newpage\thispagestyle{slide}%
  279. \else\end{slide}\@gobbletoend{slide}\fi}
  280.  
  281. \def\endslide{\par\break}
  282.  
  283. % \overlay COLORS ::=
  284. %  BEGIN
  285. %   \stepcounter{overlay}   
  286. %   \@slidesw :=G T
  287. %   if @onlyslidesw = T                       % set \@slidesw = T iff page to
  288. %     then                                  % be output
  289. %       if \c@slide < \@doslidelow
  290. %         then \@slidesw :=G F
  291. %       fi
  292. %  fi
  293. %  if \@slidesw = T
  294. %    \@slidesw :=G F
  295. %    \begingroup 
  296. %      if @bw = true 
  297. %          then  \@slidesw :=G T 
  298. %          else  \@color{COLORS}
  299. %                \if@visible then \@slidesw :=G T \fi
  300. %      fi
  301. %    \endgroup
  302. %  fi
  303. %  if \@slidesw = T
  304. %     then \newpage
  305. %          \thispagestyle{overlay}
  306. %     else \end{overlay}
  307. %          \@gobbletoend{overlay}
  308. %  fi
  309. % END
  310.  
  311. % \endoverlay ::=
  312. %  BEGIN
  313. %    \par\break
  314. %  END
  315.  
  316. \def\overlay#1{\stepcounter{overlay}\gdef\@slidesw{T}%
  317. \if@onlyslidesw\ifnum \c@slide < \@doslidelow\relax
  318. \gdef\@slidesw{F}\fi\fi
  319. \if\@slidesw T\gdef\@slidesw{F}\begingroup\if@bw\gdef\@slidesw{T}%
  320. \else\@color{#1}\if@visible \gdef\@slidesw{T}\fi\fi\endgroup\fi
  321. \if\@slidesw T\newpage\thispagestyle{overlay}%
  322. \else\end{overlay}\@gobbletoend{overlay}\fi}
  323.  
  324. \def\endoverlay{\par\break}
  325.  
  326. % \note ::=
  327. %  BEGIN
  328. %   \stepcounter{note}   
  329. %   if @bw = T
  330. %     then 
  331. %       \@slidesw :=G T
  332. %       if @onlynotesw = true                  % set \@notesw = T iff page to
  333. %         then                                 % be output
  334. %           while \c@slide > \@donotehigh
  335. %              do  \@setlimits\@donotelist\@donotelow\@donotehigh  od
  336. %           if \c@slide < \@donotelow
  337. %             then \@slidesw :=G F
  338. %           fi
  339. %       fi
  340. %     else \@slidesw :=G F
  341. %  fi
  342. %  if \@slidesw = T
  343. %     then \newpage
  344. %          \thispagestyle{note}
  345. %     else \end{note}
  346. %          \@gobbletoend{note}
  347. %  fi
  348. % END
  349.  
  350. % \endnote ::=
  351. %  BEGIN
  352. %    \par\break
  353. %  END
  354.  
  355. \def\note{\stepcounter{note}%
  356. \if@bw \gdef\@slidesw{T}\if@onlynotesw\@whilenum \c@slide > \@donotehigh\relax
  357. \do{\@setlimits\@donotelist\@donotelow\@donotehigh}\ifnum
  358. \c@slide < \@donotelow\relax \gdef\@slidesw{F}\fi\fi
  359. \else\gdef\@slidesw{F}\fi
  360. \if\@slidesw T\newpage\thispagestyle{note}\else
  361. \end{note}\@gobbletoend{note}\fi}
  362.  
  363. \def\endnote{\par\break}
  364.  
  365.  
  366. % \@color{COLORS} ::=
  367. %  BEGIN
  368. %   if math mode
  369. %     then type warning
  370. %   fi
  371. %   if @bw
  372. %     then @visible := T
  373. %     else @visible := F
  374. %         for \@x@a := COLORS
  375. %          do if \@x@a = \@currcolor
  376. %               then @visible := T
  377. %             fi
  378. %          od
  379. %   fi
  380. %   \@currsize -- sets the visibility of the current size
  381. %   \@currfont -- sets the visibility of the current font
  382. %   \ignorespaces
  383. % END
  384.  
  385. \def\@color#1{\@mmodetest
  386. \if@bw \@visibletrue\else\@visiblefalse
  387.   \@for \@x@a :=#1\do{\ifx\@x@a\@currcolor\@visibletrue\fi}\fi
  388.   \@currsize\@currfont\ignorespaces}
  389.  
  390. \def\@mmodetest{\ifmmode\@warning{Color-changing command in math mode}\fi}
  391.  
  392. % \invisible ::= BEGIN type warning if math mode
  393. %                      \@visiblefalse \@currsize\@currfont\ignorespaces END
  394.  
  395. \def\invisible{\@mmodetest\@visiblefalse\@currsize\@currfont\ignorespaces}
  396. \let\invisible=\invisible
  397. \let\endinvisible=\relax
  398.  
  399.  \message{picture,}
  400. %      ****************************************
  401. %      *          MODIFICATIONS TO            *
  402. %      *       THE PICTURE ENVIRONMENT        *
  403. %      ****************************************
  404. %
  405. %  Below are the new definitions of the picture-drawing macros
  406. %  required for SLiTeX.  Only those commands that actually
  407. %  draw something must be changed so that they do not produce
  408. %  any output when the @visible switch is false.
  409.  
  410. \def\line(#1,#2)#3{\if@visible\@xarg #1\relax \@yarg #2\relax
  411. \@linelen=#3\unitlength
  412. \ifnum\@xarg =0 \@vline 
  413.   \else \ifnum\@yarg =0 \@hline \else \@sline\fi
  414. \fi\fi}
  415.  
  416. \def\vector(#1,#2)#3{\if@visible\@xarg #1\relax \@yarg #2\relax
  417. \@linelen=#3\unitlength
  418. \ifnum\@xarg =0 \@vvector 
  419.   \else \ifnum\@yarg =0 \@hvector \else \@svector\fi
  420. \fi\fi}
  421.  
  422. \def\dashbox#1(#2,#3){\leavevmode\if@visible\hbox to \z@{\baselineskip \z@%
  423. \lineskip \z@%
  424. \@dashdim=#2\unitlength%
  425. \@dashcnt=\@dashdim \advance\@dashcnt 200
  426. \@dashdim=#1\unitlength\divide\@dashcnt \@dashdim
  427. \ifodd\@dashcnt\@dashdim=\z@%
  428. \advance\@dashcnt \@ne \divide\@dashcnt \tw@ 
  429. \else \divide\@dashdim \tw@ \divide\@dashcnt \tw@
  430. \advance\@dashcnt \m@ne
  431. \setbox\@dashbox=\hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
  432. \@width \@dashdim}\put(0,0){\copy\@dashbox}%
  433. \put(0,#3){\copy\@dashbox}%
  434. \put(#2,0){\hskip-\@dashdim\copy\@dashbox}%
  435. \put(#2,#3){\hskip-\@dashdim\box\@dashbox}%
  436. \multiply\@dashdim 3 
  437. \fi
  438. \setbox\@dashbox=\hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
  439. \@width #1\unitlength\hskip #1\unitlength}\@tempcnta=0
  440. \put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
  441. \do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta=0
  442. \put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
  443. \do{\copy\@dashbox\advance\@tempcnta \@ne }}%
  444. \@dashdim=#3\unitlength%
  445. \@dashcnt=\@dashdim \advance\@dashcnt 200
  446. \@dashdim=#1\unitlength\divide\@dashcnt \@dashdim
  447. \ifodd\@dashcnt \@dashdim=\z@%
  448. \advance\@dashcnt \@ne \divide\@dashcnt \tw@
  449. \else
  450. \divide\@dashdim \tw@ \divide\@dashcnt \tw@
  451. \advance\@dashcnt \m@ne
  452. \setbox\@dashbox\hbox{\hskip -\@halfwidth
  453. \vrule \@width \@wholewidth 
  454. \@height \@dashdim}\put(0,0){\copy\@dashbox}%
  455. \put(#2,0){\copy\@dashbox}%
  456. \put(0,#3){\lower\@dashdim\copy\@dashbox}%
  457. \put(#2,#3){\lower\@dashdim\copy\@dashbox}%
  458. \multiply\@dashdim 3
  459. \fi
  460. \setbox\@dashbox\hbox{\vrule \@width \@wholewidth 
  461. \@height #1\unitlength}\@tempcnta0
  462. \put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta < \@dashcnt
  463. \do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
  464. \vskip\@dashdim}}\@tempcnta0
  465. \put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta< \@dashcnt
  466. \relax\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
  467. \vskip\@dashdim}}}\fi\@makepicbox(#2,#3)}
  468.  
  469. \def\@oval(#1,#2)[#3]{\if@visible\begingroup \boxmaxdepth \maxdimen
  470.   \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
  471.   \@tfor\@tempa :=#3\do{\csname @ov\@tempa false\endcsname}\@ovxx
  472.   #1\unitlength \@ovyy #2\unitlength
  473.   \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx\else \@ovyy \fi
  474.   \@getcirc \@tempdimb
  475.   \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
  476.   \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@
  477.   \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@
  478.   \@circlefnt \setbox\@tempboxa
  479.   \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi
  480.   \if@ovl \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx \fi
  481.   \if@ovt \@ovhorz \kern -\@ovxx \fi
  482.   \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro
  483.   \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
  484.   \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
  485.   \endgroup\fi}
  486.  
  487. \def\@circle#1{\if@visible \begingroup \boxmaxdepth \maxdimen 
  488.    \@tempdimb #1\unitlength
  489.    \ifdim \@tempdimb >15.5pt\relax \@getcirc\@tempdimb
  490.       \@ovro\ht\@tempboxa 
  491.      \setbox\@tempboxa\hbox{\@circlefnt
  492.       \advance\@tempcnta\tw@ \char \@tempcnta
  493.       \advance\@tempcnta\m@ne \char \@tempcnta \kern -2\@tempdima
  494.       \advance\@tempcnta\tw@
  495.       \raise \@tempdima \hbox{\char\@tempcnta}\raise \@tempdima
  496.         \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@
  497.       \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}%
  498.    \else  \@circ\@tempdimb{96}\fi\endgroup\fi}
  499.  
  500. \def\@dot#1{\if@visible\@tempdimb #1\unitlength \@circ\@tempdimb{112}\fi}
  501.  
  502. \long\def\@iframebox[#1][#2]#3{\leavevmode
  503.   \savebox\@tempboxa[#1][#2]{\kern\fboxsep #3\kern\fboxsep}\@tempdima\fboxrule
  504.     \advance\@tempdima \fboxsep \advance\@tempdima \dp\@tempboxa
  505.    \hbox{\lower \@tempdima\hbox
  506.   {\vbox{ \if@visible \hrule \@height \else \vskip \fi \fboxrule 
  507.           \hbox{\if@visible \vrule \@width \fboxrule \hskip-\fboxrule \fi
  508.                 \vbox{\vskip\fboxsep \box\@tempboxa\vskip\fboxsep}\if@visible 
  509.                 \vrule \@width \fboxrule \hskip-\fboxrule \fi}\if@visible 
  510.       \hrule \@height \else \vskip\fi\fboxrule}}}}
  511.          
  512.  
  513. \long\def\frame#1{\if@visible\leavevmode
  514. \vbox{\vskip-\@halfwidth\hrule \@height\@halfwidth \@depth \@halfwidth
  515.   \vskip-\@halfwidth\hbox{\hskip-\@halfwidth \vrule \@width\@wholewidth
  516.   \hskip-\@halfwidth #1\hskip-\@halfwidth \vrule \@width \@wholewidth
  517.   \hskip -\@halfwidth}\vskip -\@halfwidth\hrule \@height \@halfwidth
  518.   \@depth \@halfwidth\vskip -\@halfwidth}\else #1\fi}
  519.  
  520. \long\def\fbox#1{\leavevmode\setbox\@tempboxa\hbox{#1}\@tempdima\fboxrule
  521.     \advance\@tempdima \fboxsep \advance\@tempdima \dp\@tempboxa
  522.    \hbox{\lower \@tempdima\hbox
  523.   {\vbox{\if@visible \hrule \@height \else \vskip\fi\fboxrule 
  524.           \hbox{\if@visible\vrule \@width \else \hskip \fi\fboxrule 
  525.                  \hskip\fboxsep
  526.         \vbox{\vskip\fboxsep \box\@tempboxa\vskip\fboxsep}\hskip 
  527.                    \fboxsep \if@visible\vrule \@width\else\hskip \fi\fboxrule}
  528.            \if@visible\hrule \@height \else \vskip \fi\fboxrule}}}}
  529.  
  530.  \message{mods,}
  531. %      ****************************************
  532. %      *        OTHER MODIFICATIONS TO        *
  533. %      *        TeX AND LaTeX COMMANDS        *
  534. %      ****************************************
  535. %
  536.  
  537. % \rule
  538.  
  539. \def\@rule[#1]#2#3{\@tempdima#3\advance\@tempdima #1\leavevmode
  540.  \hbox{\if@visible\vrule
  541.   \@width#2 \@height\@tempdima \@depth-#1\else
  542. \vrule \@width \z@ \@height\@tempdima \@depth-#1\vrule 
  543.  \@width#2 \@height\z@\fi}}
  544.  
  545. % \_  (Added 10 Nov 86)
  546.  
  547. \def\_{\leavevmode \kern.06em \if@visible\vbox{\hrule width.3em}\else
  548.    \vbox{\hrule height 0pt width.3em}\vbox{\hrule width 0pt}\fi}
  549.  
  550. % \overline, \underline, \frac and \sqrt
  551. %
  552. % \@mathbox{STYLE}{BOX}{MTEXT} : Called in math mode, typesets MTEXT and
  553. %   stores result in BOX, using style STYLE.
  554. %
  555. % \@bphant{BOX}    : Creates a phantom with dimensions BOX.
  556. % \@vbphant{BOX}   : Creates a phantom with ht of BOX and zero width.
  557. % \@hbphant{BOX}   : Creates a phantom with width of BOX and zero ht & dp.
  558. % \@hvsmash{STYLE}{MTEXT} : Creates a copy of MTEXT with zero height and width
  559. %                           in style STYLE.
  560.  
  561. \def\@mathbox#1#2#3{\setbox#2\hbox{$\m@th#1{#3}$}}
  562.  
  563. \def\@vbphantom#1{\setbox\tw@\null \ht\tw@\ht #1 \dp\tw@\dp #1
  564.    \box\tw@}
  565.  
  566. \def\@bphantom#1{\setbox\tw@\null \wd\tw@\wd #1 \ht\tw@\ht #1 \dp\tw@\dp #1
  567.    \box\tw@}
  568.  
  569. \def\@hbphantom#1{\setbox\tw@\null \wd\tw@\wd #1 \ht\tw@\z@ \dp\tw@\z@
  570.    \box\tw@}
  571.  
  572. \def\@hvsmash#1#2{\@mathbox#1\z@{#2}\ht\z@\z@ \dp\z@\z@ \wd\z@\z@ \box\z@}
  573.  
  574. \def\underline#1{\relax\ifmmode 
  575.   \@xunderline{#1}\else $\@xunderline{\hbox{#1}}$\relax\fi}
  576.  
  577. \def\@xunderline#1{\mathchoice{\@xyunderline\displaystyle{#1}}{\@xyunderline
  578.     \textstyle{#1}}{\@xyunderline\scriptstyle{#1}}{\@xyunderline
  579.       \scriptscriptstyle{#1}}}
  580.  
  581. \def\@xyunderline#1#2{\@mathbox#1\@smashboxa{#2}\@hvsmash#1{\copy\@smashboxa}
  582.    \if@visible \@hvsmash#1{\@@underline{\@bphantom\@smashboxa}}\fi
  583.   \@mathbox#1\@smashboxb{\@@underline{\box\@smashboxa}}
  584.    \@bphantom\@smashboxb}
  585.  
  586. \let\@@overline=\overline 
  587.  
  588. \def\overline#1{\mathchoice{\@xoverline\displaystyle{#1}}{\@xoverline
  589.     \textstyle{#1}}{\@xoverline\scriptstyle{#1}}{\@xoverline
  590.       \scriptscriptstyle{#1}}}
  591.  
  592. \def\@xoverline#1#2{\@mathbox#1\@smashboxa{#2}\@hvsmash#1{\copy\@smashboxa}
  593.    \if@visible \@hvsmash#1{\@@overline{\@bphantom\@smashboxa}}\fi
  594.    \@mathbox#1\@smashboxb{\@@overline{\box\@smashboxa}}
  595.    \@bphantom\@smashboxb}
  596.  
  597.  
  598. % \@frac {STYLE}{DENOMSTYLE}{NUM}{DEN}{FONTSIZE} : Creates \frac{NUM}{DENOM}
  599. %   in style SYTLE with NUM and DENOM in style DENOMSTYLE
  600. %   FONTSIZE should be \textfont \scriptfont or \scriptscriptfont
  601.  
  602. \def\frac#1#2{\mathchoice
  603.    {\@frac\displaystyle\textstyle{#1}{#2}\textfont}{\@frac
  604.           \textstyle\scriptstyle{#1}{#2}\textfont}{\@frac
  605.           \scriptstyle\scriptscriptstyle{#1}{#2}\scriptfont}{\@frac
  606.           \scriptscriptstyle\scriptscriptstyle{#1}{#2}\scriptscriptfont}}
  607.  
  608. \def\@frac#1#2#3#4#5{\@mathbox#2\@smashboxa{#3}\@mathbox#2\@smashboxb{#4}
  609.    \@mathbox#1\@smashboxc{\copy\@smashboxa\over\copy\@smashboxb}   
  610.    \@vbphantom\@smashboxc
  611.    \vcenter{\vbox to \z@{\hsize \wd\@smashboxc
  612.                          \vss\nointerlineskip
  613.                          \hbox to \wd\@smashboxc{\hss\box\@smashboxa\hss}
  614.               \hrule height \z@}
  615.           \vskip 7\fontdimen8#53            
  616.           \if@visible\hrule height \fontdimen8#53\else \vskip \fontdimen8#53\fi
  617.           \vskip 7\fontdimen8#53            
  618.           \nointerlineskip
  619.           \vbox to \z@{\nointerlineskip
  620.                          \hbox to \wd\@smashboxc{\hss\box\@smashboxb\hss}
  621.               \hrule height \z@\vss}
  622.            }}
  623.  
  624. \def\r@@t#1#2{\setbox\z@\hbox{$\m@th#1\@xysqrt#1{#2}$}
  625.   \dimen@\ht\z@ \advance\dimen@-\dp\z@
  626.   \mskip5mu\raise.6\dimen@\copy\rootbox \mskip-10mu \box\z@}
  627.  
  628. \def\sqrt{\@ifnextchar[{\@sqrt}{\@xsqrt}}
  629. \def\@sqrt[#1]{\root #1\of}
  630. \def\@xsqrt#1{\mathchoice{\@xysqrt\displaystyle{#1}}{\@xysqrt
  631.      \textstyle{#1}}{\@xysqrt\scriptstyle{#1}}{\@xysqrt
  632.     \scriptscriptstyle{#1}}}
  633. \def\@xysqrt#1#2{\@mathbox#1\@smashboxa{#2}\if@visible
  634.     \@hvsmash#1{\@@sqrt{\@bphantom\@smashboxa}}\fi
  635.     \phantom{\@@sqrt{\@vbphantom\@smashboxa}}\box\@smashboxa}
  636.  
  637. \newbox\@smashboxa
  638. \newbox\@smashboxb
  639. \newbox\@smashboxc
  640.  
  641.  
  642.  
  643.  \message{output,}
  644. %      ****************************************
  645. %      *   CHANGES TO LaTeX \output ROUTINE   *
  646. %      ****************************************
  647. %
  648. %  \@makecol ==
  649. %    BEGIN
  650. % % Following test added for slides to check if extra page
  651. %     if @makingslides = T
  652. %     then if \c@page > 0
  653. %             then if \c@note > 0
  654. %                     then type 'Note \thenote too long.'
  655. %                     else if \c@overlay > 0
  656. %                            then type 'Overlay \theoverlay too long.'
  657. %                            else type 'Slide \theslide too long'
  658. %     fi     fi     fi     fi
  659. %     ifvoid \insert\footins
  660. %        then  \@outputbox := \box255
  661. %        else  \@outputbox := \vbox {\unvbox255
  662. %                                    \vskip \skip\footins
  663. %                                    \footnoterule
  664. %                                    \unvbox\@footinsert
  665. %                                   }
  666. %    fi
  667. %    \@freelist :=G \@freelist * \@midlist
  668. %    \@midlist  :=G empty
  669. %    \@combinefloats
  670. %    \@outputbox := \vbox to \@colht{\boxmaxdepth := \maxdepth
  671. %                                     \vfil     %%\vfil added for slides
  672. %                                     \unvbox\@outputbox
  673. %                                     \vfil }   %%\vfil added for slides
  674. %    \maxdepth :=G \@maxdepth
  675. %    END
  676.  
  677. \def\@makecol{\if@makingslides\ifnum\c@page>\z@ \@extraslide\fi\fi
  678. \ifvoid\footins \setbox\@outputbox\box\@cclv \let\@botfil\vfil
  679.    \else\let\@botfil\relax\setbox\@outputbox
  680.      \vbox{\unvbox\@cclv\vfil
  681.            \vskip\skip\footins\footnoterule\unvbox\footins\vskip
  682.             \z@ plus.1fil\relax}\fi
  683.   \xdef\@freelist{\@freelist\@midlist}\gdef\@midlist{}\@combinefloats
  684.      \setbox\@outputbox\vbox to\@colht{\boxmaxdepth\maxdepth
  685.         \vfil\unvbox\@outputbox\@botfil}\global\maxdepth\@maxdepth}
  686.  
  687. \def\@extraslide{\ifnum\c@note>\z@ 
  688.     \@warning{Note \thenote\space too long}\else 
  689.      \ifnum\c@overlay>\z@ 
  690.         \@warning{Overlay \theoverlay\space too long}\else 
  691.         \@warning{Slide \theslide\space too long}\fi\fi}
  692.  
  693.  \message{init}
  694. %      ****************************************
  695. %      *    SPECIAL SLiTeX INITIALIZATIONS    *
  696. %      ****************************************
  697. %
  698. \nofiles
  699. \@visibletrue
  700.  
  701.